<div class="row">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li>
                <i class="fa fa-dashboard"></i> <a href="index.html">考试管理</a>
            </li>
            <li class="active">
                <i class="fa fa-table"></i> 添加试题
            </li>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">添加试题</h3>
            </div>
            <div class="box-body">
                <form class="form-horizontal">
                    <div class="col-md-10">
                        <div class="form-group">
                            <label class="col-md-2 control-label">试题类型：</label>
                            <div class="col-md-10">
                                <label class="radio-inline" for="type-choice">
                                    <input type="radio" name="type" id="type-choice" value="单选题" checked="checked" ng-model="type"> 单选题
                                </label>
                                <label class="radio-inline" for="type-multi-choice">
                                    <input type="radio" name="type" id="type-multi-choice" value="多选题" checked="checked" ng-model="type"> 多选题
                                </label>
                                <label class="radio-inline" for="type-completion">
                                    <input type="radio" name="type" id="type-completion" value="填空题" ng-model="type"> 填空题
                                </label>
                                <label class="radio-inline" for="type-judgment">
                                    <input type="radio" name="type" id="type-judgment" value="判断题" ng-model="type"> 判断题
                                </label>
                            </div>
                        </div>
                    </div>
                    <!-- 选择题 -->
                    <div class="select" ng-show="type == '单选题'">
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" for="select-title">题目内容：</label>
                                <div class="col-md-10">
                                    <input id="select-title" name="select-title" type="text" placeholder="题目内容" class="form-control input-md" ng-model="question.select.title">
                                </div>
                            </div>
                        </div>
                        <br>
                        <br>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" >选项内容：</label>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="optionA" class="col-md-2 control-label">
                                    A )
                                </label>
                                <div class="col-md-10">
                                    <input id="optionA" name="optionA" type="text" placeholder="" class="form-control input-md" ng-model="question.select.optionA" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="optionB" class="col-md-2 control-label">
                                    B )
                                </label>
                                <div class="col-md-10">
                                    <input id="optionB" name="optionB" type="text" placeholder="" class="form-control input-md" ng-model="question.select.optionB" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="optionC" class="col-md-2 control-label">
                                    C )
                                </label>
                                <div class="col-md-10">
                                    <input id="optionC" name="optionC" type="text" placeholder="" class="form-control input-md" ng-model="question.select.optionC" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="optionD" class="col-md-2 control-label">
                                    D )
                                </label>
                                <div class="col-md-10">
                                    <input id="optionD" name="optionD" type="text" placeholder="" class="form-control input-md" ng-model="question.select.optionD" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label">答案：</label>
                                <div class="col-md-4">
                                    <label class="radio-inline" for="select-answer-a">
                                        <input type="radio" name="select-answer-a" id="select-answer-a" value="A" checked="checked" ng-model="question.select.answer"> A
                                    </label>
                                    <label class="radio-inline" for="select-answer-b">
                                        <input type="radio" name="select-answer-b" id="select-answer-b" value="B" checked="checked" ng-model="question.select.answer"> B
                                    </label>
                                    <label class="radio-inline" for="select-answer-c">
                                        <input type="radio" name="select-answer-c" id="select-answer-c" value="C" checked="checked" ng-model="question.select.answer"> C
                                    </label>
                                    <label class="radio-inline" for="select-answer-d">
                                        <input type="radio" name="select-answer-d" id="select-answer-d" value="D" checked="checked" ng-model="question.select.answer"> D
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 选择题 -->
                    <div class="select" ng-show="type == '多选题'">
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" for="multi-select-title">题目内容：</label>
                                <div class="col-md-10">
                                    <input id="multi-select-title" name="multi-select-title" type="text" placeholder="题目内容" class="form-control input-md" ng-model="question.multi_select.title">
                                </div>
                            </div>
                        </div>
                        <br>
                        <br>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" >选项内容：</label>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="multi-optionA" class="col-md-2 control-label">
                                    A )
                                </label>
                                <div class="col-md-10">
                                    <input id="multi-optionA" name="optionA" type="text" placeholder="" class="form-control input-md" ng-model="question.multi_select.optionA" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="multi-optionB" class="col-md-2 control-label">
                                    B )
                                </label>
                                <div class="col-md-10">
                                    <input id="multi-optionB" name="optionB" type="text" placeholder="" class="form-control input-md" ng-model="question.multi_select.optionB" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="multi-optionC" class="col-md-2 control-label">
                                    C )
                                </label>
                                <div class="col-md-10">
                                    <input id="multi-optionC" name="optionC" type="text" placeholder="" class="form-control input-md" ng-model="question.multi_select.optionC" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label for="multi-optionD" class="col-md-2 control-label">
                                    D )
                                </label>
                                <div class="col-md-10">
                                    <input id="multi-optionD" name="optionD" type="text" placeholder="" class="form-control input-md" ng-model="question.multi_select.optionD" required>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label">答案：</label>
                                <div class="col-md-4">
                                    <label class="radio-inline" for="multi-select-answer-a">
                                        <input type="checkbox" name="multi-select-answer-a" id="multi-select-answer-a" checked="checked" ng-model="multi_select_answer.optionA"> A
                                    </label>
                                    <label class="radio-inline" for="multi-select-answer-b">
                                        <input type="checkbox" name="multi-select-answer-b" id="multi-select-answer-b" checked="checked" ng-model="multi_select_answer.optionB"> B
                                    </label>
                                    <label class="radio-inline" for="multi-select-answer-c">
                                        <input type="checkbox" name="multi-select-answer-c" id="multi-select-answer-c" checked="checked" ng-model="multi_select_answer.optionC"> C
                                    </label>
                                    <label class="radio-inline" for="multi-select-answer-d">
                                        <input type="checkbox" name="multi-select-answer-d" id="multi-select-answer-d" checked="checked" ng-model="multi_select_answer.optionD"> D
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="simple" ng-show="type == '填空题'">
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" for="completion-title">题目内容：</label>
                                <div class="col-md-10">
                                    <textarea class="form-control" rows="6"  id="completion-title" name="completion-title" placeholder="200字以内" ng-model="question.simple.title"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" for="completion-answer">答案：</label>
                                <div class="col-md-10">
                                    <textarea class="form-control" rows="6"  id="completion-answer" name="completion-answer" placeholder="多个答案以逗号隔开" ng-model="question.simple.answer"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="simple" ng-show="type == '判断题'">
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label" for="judgment-title">题目内容：</label>
                                <div class="col-md-10">
                                    <textarea class="form-control" rows="6"  id="judgment-title" name="judgment-title" placeholder="200字以内" ng-model="question.judgment.title"></textarea>
                                </div>
                            </div>
                        </div>
                        <br>
                        <br>
                        <div class="col-md-10">
                            <div class="form-group">
                                <label class="col-md-2 control-label">答案：</label>
                                <div class="col-md-4">
                                    <label class="radio-inline" for="judgment-answer-true">
                                        <input type="radio" name="judgment-answer-true" id="judgment-answer-true" value="true" checked="checked" ng-model="question.judgment.answer"> 正确
                                    </label>
                                    <label class="radio-inline" for="judgment-answer-false">
                                        <input type="radio" name="judgment-answer-false" id="judgment-answer-false" value="false" checked="checked" ng-model="question.judgment.answer"> 错误
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="alert alert-success fade save-success" style="display: none;">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong style="color: #ffffff;"> 保存成功！</strong>
            </div>
            <div class="alert alert-warning fade save-fail" style="display: none;">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong style="color: #ffffff;"> 保存失败！</strong>
            </div>
            <div class="box-footer">
                <a id="addPaper" class="btn btn-info pull-right" type="button" ng-click="submit();"><i class="glyphicon glyphicon-floppy-save"></i> 保存</a>
            </div>
        </div>
    </div>
</div>
